#!/bin/sh
killall rsync &> /dev/null

serviceName=rsync
systemctl stop rsync.service

## rsync rpm 卸载
rsync_rpm_name=`rpm -qa rsync`
if [ -n ${rsync_rpm_name} ];then
	rpm -e --nodeps ${rsync_rpm_name}
fi

## inotify rpm 卸载
inotify_rpm_name=`rpm -qa inotify-tools`
if [ -n ${inotify_rpm_name} ];then
	rpm -e --nodeps ${inotify_rpm_name}
fi

rm -rf  /usr/lib/systemd/system/rsync.service
systemctl daemon-reload

##删除rsync相关文件
rm -rf /etc/rsync
rm -f /var/log/rsyncd.log